package com.swxc.smartorder.app

import com.swxc.smartorder.BuildConfig
import com.swxc.smartorder.utils.ApkVersionCodeUtils

/**
 * Author   Administrator
 * Date     2018/3/30
 * Desc     eg
 *
 * @author Administrator
 */
object GlobalAPI {
    /**
     * 测试服务器域名
     */

    private val DOMAIN = if (BuildConfig.DEBUG) "http://shiwaixiangcun.cn" else "http://hxteb.com"
    private val SC_DOMAIN = if (BuildConfig.DEBUG) "http://sc.shiwaixiangcun.cn" else "http://sc.hxteb.com"
    private var versionCode = ApkVersionCodeUtils.getVerName(App.getContext())


    //登录
    var login = "$DOMAIN/oauth2/token"
    //退出登录
    var signOut = "$SC_DOMAIN/logout.htm"
    //修改头像
    var modifyAvatar: String? = "$SC_DOMAIN/ms/v$versionCode/avatar.json"
    //工单列表
    var orderList = "$SC_DOMAIN/ms/v$versionCode/workOrder/listdata.json"
    //工单详情
    var orderDetail = "$SC_DOMAIN/ms/v$versionCode/workOrder/detail.json"
    var acceptOrder: String? = "$SC_DOMAIN/ms/v$versionCode/workOrder/handle.json"
    //用户信息
    var userInfo: String? = "$SC_DOMAIN/ms/v$versionCode/currentStaff.json"
    //联系人信息
    var contactList: String? = "$SC_DOMAIN/ms/v$versionCode/list.json"
    //修改密码
    var modifyPwd = "$SC_DOMAIN/mi/v$versionCode/resetPassWord.json"
    //获取验证码
    var getVerification = "$SC_DOMAIN/mi/v$versionCode/getSMSVerificationCode.json"
    //验证验证码
    var verification = "$SC_DOMAIN/mi/v$versionCode/checkIsCorrectCode.json"
    //工作列表
    var workList = "$SC_DOMAIN/ms/v$versionCode/workOrder/workList.json"
    //反馈信息
    var feedback = "$SC_DOMAIN/ms/v$versionCode/feedback/add.json"
    //上传图片
    var sendImage = "$SC_DOMAIN/upload/images.json"
    //版本更新
    var update: String? = "$SC_DOMAIN/mi/app/update/android.json"
    val setAlisa = "$SC_DOMAIN/ms/v$versionCode/setPushAlias.json"
}
